babl.git
16 years agofix CIE Lab alpha float format
Øyvind Kolås [Mon, 18 Jan 2010 00:51:20 +0000 (00:51 +0000)]
fix CIE Lab alpha float format

It used to specify a double data type.

16 years agoPost release increment of version to 0.1.3
Øyvind Kolås [Thu, 14 Jan 2010 18:02:05 +0000 (18:02 +0000)]
Post release increment of version to 0.1.3

16 years agoRelease babl-0.1.2
Øyvind Kolås [Thu, 14 Jan 2010 18:01:04 +0000 (18:01 +0000)]
Release babl-0.1.2

16 years agoOnly initialize test buffers once
Øyvind Kolås [Sun, 29 Nov 2009 15:42:05 +0000 (15:42 +0000)]
Only initialize test buffers once

Also made the test buffer static inline for individual conversions like
it already was for fish paths.

Note, this relies on none of the tested conversions by accident
being buggy enough to modify their source data, adding a sanity
function that compares the buffers with the correct values could
perhaps be useful.

16 years agomade babl_list_size babl_list_get_first and babl_list_get_last macros.
Øyvind Kolås [Thu, 26 Nov 2009 18:45:41 +0000 (18:45 +0000)]
made babl_list_size babl_list_get_first and babl_list_get_last macros.

Thereby forcing inlining to gain performance critical code where the
overhead of additional function calls matter.

16 years agoFix logic for type detection in babl_fish_process
Øyvind Kolås [Tue, 24 Nov 2009 01:18:57 +0000 (01:18 +0000)]
Fix logic for type detection in babl_fish_process

16 years agoRemoved two function calls in common path
Øyvind Kolås [Tue, 24 Nov 2009 01:04:38 +0000 (01:04 +0000)]
Removed two function calls in common path

Re-arranged code making babl_process and babl_fish_process reside
in babl-path-fish.c, where babl_fish_process and babl_fish_path_process
can be inlined with babl_process().

16 years agoRemoved instrumentation from babl_process.
Øyvind Kolås [Tue, 24 Nov 2009 00:56:56 +0000 (00:56 +0000)]
Removed instrumentation from babl_process.

This is part of the inner babl processing and should be as slim as
posisble.

16 years agoRemove use of static buffer to build the name for format.
Øyvind Kolås [Sun, 22 Nov 2009 18:28:23 +0000 (18:28 +0000)]
Remove use of static buffer to build the name for format.

16 years agoMake the initial list size in all databases 512 long.
Øyvind Kolås [Sun, 22 Nov 2009 17:44:52 +0000 (17:44 +0000)]
Make the initial list size in all databases 512 long.

Like the previous commit.

16 years agoIncrease the default size of hash tables to 512 entries.
Øyvind Kolås [Sun, 22 Nov 2009 17:10:39 +0000 (17:10 +0000)]
Increase the default size of hash tables to 512 entries.

This avoids resizing of the hash tables for all typical usage scenarios
and thus avoids a potential race condition in unlocked lookups.

16 years agoFix accidental use of the format mutex instead of the debug mutex.
Øyvind Kolås [Sat, 21 Nov 2009 18:31:50 +0000 (18:31 +0000)]
Fix accidental use of the format mutex instead of the debug mutex.

The memory statistics book-keeping was reusing the BablFormat flag mutex
thus deadlocking with pthreads mutexes since they are not recursive by
default.

16 years agoCriticalSection does not exist, it is CRITICAL_SECTION
Michael Schumacher [Sat, 21 Nov 2009 17:11:23 +0000 (18:11 +0100)]
CriticalSection does not exist, it is CRITICAL_SECTION

16 years agoMade BablFishPath thread safe.
Øyvind Kolås [Sat, 21 Nov 2009 16:47:24 +0000 (16:47 +0000)]
Made BablFishPath thread safe.

Refactored static variables away and added a lock to protect state
keeping inside the individual BablFormat when permutating possible
conversion paths.

16 years agoAdded a mutex to memory sanity counters.
Øyvind Kolås [Sat, 21 Nov 2009 16:42:43 +0000 (16:42 +0000)]
Added a mutex to memory sanity counters.

Also added a BABL_DEBUG_MEM define which is set to 1 in babl-internal.h
that can be used to disable these locks which only are nedded when
debugging.

16 years agoFirst aproximation to a thread-safe version of babl.
Daniel Paredes García [Wed, 8 Jul 2009 14:58:45 +0000 (16:58 +0200)]
First aproximation to a thread-safe version of babl.

16 years agoMade the each babl type db in babl have a mutex.
Øyvind Kolås [Sat, 21 Nov 2009 16:15:04 +0000 (16:15 +0000)]
Made the each babl type db in babl have a mutex.

We lock only on mutations of the databases, when reading from them no
locks are needed.

16 years agoMade babl_hash_table_find thread safe by making find_func an argument.
Øyvind Kolås [Sat, 21 Nov 2009 16:05:00 +0000 (16:05 +0000)]
Made babl_hash_table_find thread safe by making find_func an argument.

16 years agoAdded a BablMutex type.
Øyvind Kolås [Sat, 21 Nov 2009 15:55:11 +0000 (15:55 +0000)]
Added a BablMutex type.

Mutex abstraction for internal use pthreads by default and critical
sections on win32.

16 years agoMake babl_ticks() thread safe.
Øyvind Kolås [Sat, 21 Nov 2009 15:50:41 +0000 (15:50 +0000)]
Make babl_ticks() thread safe.

Made a static variable a temporary variable in the only function using
it.

16 years agotests: Add pthread based concurrency stress test for babl_fish()
Martin Nordholts [Thu, 19 Nov 2009 18:59:10 +0000 (19:59 +0100)]
tests: Add pthread based concurrency stress test for babl_fish()

Add a test that runs a bunch of pthread threads, all trying to use
babl_fish() at the same time. This test currently fails and it is the
goal of bug 587675 to make it pass.

The cause of the failure is the static variables in babl-fish-path.c.
In particular 'current_path' clearly needs to be moved to some
instance variable.

16 years agoAdded direct code paths for RGB u8 and RGBA u8 to RaGaBaA float
Øyvind Kolås [Thu, 12 Nov 2009 19:32:39 +0000 (19:32 +0000)]
Added direct code paths for RGB u8 and RGBA u8 to RaGaBaA float

16 years agoBug 562741 - babl Cygwin patch : PLATFORM_WIN32 patch
Yaakov Selkowitz [Thu, 8 Oct 2009 23:33:26 +0000 (01:33 +0200)]
Bug 562741 -  babl Cygwin patch : PLATFORM_WIN32 patch

16 years agoUpdate .gitignore for win32
Martin Nordholts [Fri, 7 Aug 2009 19:47:00 +0000 (21:47 +0200)]
Update .gitignore for win32

16 years agoAdd $(EXEEXT) to tools in Makefile.ams to fix win32 compilation
Martin Nordholts [Fri, 7 Aug 2009 19:17:35 +0000 (21:17 +0200)]
Add $(EXEEXT) to tools in Makefile.ams to fix win32 compilation

16 years agobabl: Fix compiler warnings
Martin Nordholts [Tue, 4 Aug 2009 19:01:20 +0000 (21:01 +0200)]
babl: Fix compiler warnings

Avoid redefinition and implicit casts

16 years agoextensions: Add "CIE LCH(ab) [alpha] float"
Martin Nordholts [Sun, 2 Aug 2009 08:57:37 +0000 (10:57 +0200)]
extensions: Add "CIE LCH(ab) [alpha] float"

Add "CIE LCH(ab) float" and "CIE LCH(ab) alpha float" as babl formats
and implement conversions from/to RGBA float.

16 years agoextensions: Remove disabled gamma related code in CIE.c
Martin Nordholts [Sat, 1 Aug 2009 21:42:10 +0000 (23:42 +0200)]
extensions: Remove disabled gamma related code in CIE.c

Remove disabled gamma related code in CIE.c, no point in keeping it
around, it only complicates the code.

16 years agoextensions: Rename CIE-Lab.c to CIE.c
Martin Nordholts [Sat, 1 Aug 2009 19:43:38 +0000 (21:43 +0200)]
extensions: Rename CIE-Lab.c to CIE.c

Rename CIE-Lab.c to CIE.c so that we can keep more CIE color spaces in
a single file. It would be overkill to separate the common code for
other color spaces into shared files.

16 years agoChange occurences of assert (0) into babl_fatal()
Danny Robson [Sun, 19 Jul 2009 12:50:37 +0000 (22:50 +1000)]
Change occurences of assert (0) into babl_fatal()

babl_fatal() is the more appropriate method to die upon failure, so
all instances of assert (0) have been changed into babl_fatal() with
some attempt of an error message.

In this process, the babl_fish_process() method was refactored into
using the existing case statement.

Bug #589027.

16 years agoChange sprintf() to babl_strcat() in model create_name()
Danny Robson [Sun, 19 Jul 2009 11:35:40 +0000 (21:35 +1000)]
Change sprintf() to babl_strcat() in model create_name()

babl/babl-model.c create_name uses an unsafe incantation of sprintf
to build names from concatenated components which should ideally use a
"%s" format specifier preceding the instance name.

Instead of fixing this, we replace it with a babl_strcat() based
alternative which allows us to remove the thread-unsafe static character
buffer at the cost of a few mallocs and a free.

Also do some cleanups, mainly to avoid two exit points from the
function, that increases readability and warns if a model with the
same name is registered twice.

This is bug #589021.

16 years agoMake use of system return value to avoid warnings
Danny Robson [Sun, 19 Jul 2009 09:31:47 +0000 (19:31 +1000)]
Make use of system return value to avoid warnings

Make (minimal) use of system's return value to avoid gcc complaining, as
it's declared using the warn_unused_result attribute.

16 years agoUse pointer integer types for comparisons
Danny Robson [Sun, 19 Jul 2009 09:24:54 +0000 (19:24 +1000)]
Use pointer integer types for comparisons

Convert all occurences of pointer arithmetic using integral types to use
the standard ptrdiff_t and intptr_t types. Fixes some build warnings.

16 years agoIncorporate minor version in soname
Martin Nordholts [Fri, 17 Jul 2009 18:19:38 +0000 (20:19 +0200)]
Incorporate minor version in soname

Incorporate minor version in soname. We do this to compensate for the
immaturity of the API and future ABI/API breakage.

16 years agoEnable automake silent-rules by default
Martin Nordholts [Tue, 14 Jul 2009 18:06:27 +0000 (20:06 +0200)]
Enable automake silent-rules by default

Enable silent build rules by default, requires at least
Automake-1.11. Disable by either passing --disable-silent-rules to
configure or passing V=1 to make.

16 years agoGenerate ChangeLog from git log
Martin Nordholts [Tue, 14 Jul 2009 17:55:20 +0000 (19:55 +0200)]
Generate ChangeLog from git log

Add rule to generate ChangeLog from git log, copied from pango and
Behdad Esfahbod. Also disable the rss generation in docs since the rss
tool can't handle the git log format.

16 years agoUpdate .gitignore
Martin Nordholts [Tue, 14 Jul 2009 17:40:16 +0000 (19:40 +0200)]
Update .gitignore

16 years agoextensions: Explicitly specify sources
Martin Nordholts [Tue, 14 Jul 2009 17:39:59 +0000 (19:39 +0200)]
extensions: Explicitly specify sources

Explicitly specify extension sources since there seems to be some
problem with AM_DEFAULT_SOURCE_EXT with automake-1.11.

16 years agobabl: Don't declare functions with external linkage as inline
Martin Nordholts [Tue, 14 Jul 2009 17:33:56 +0000 (19:33 +0200)]
babl: Don't declare functions with external linkage as inline

Don't declare functions with external linkage as inline. The way we
did it is forbidden in C99 and causes compilation problems on other
platforms. See bug #572154.

16 years agoUpdate SVN reference to git
Martin Nordholts [Tue, 23 Jun 2009 04:28:17 +0000 (06:28 +0200)]
Update SVN reference to git

16 years agorequire automake >= 1.9.6 and libtool >= 1.5
Sven Neumann [Fri, 3 Jul 2009 19:04:58 +0000 (21:04 +0200)]
require automake >= 1.9.6 and libtool >= 1.5

16 years agoAdd babl.doap
Martin Nordholts [Sat, 23 May 2009 11:41:20 +0000 (13:41 +0200)]
Add babl.doap

16 years agoBug 583565 – babl 0.1.0 build fixes
Fryderyk Dziarmagowski [Sat, 23 May 2009 10:55:39 +0000 (12:55 +0200)]
Bug 583565 – babl 0.1.0 build fixes

Don't apply dynamic library versioning to the babl extensions.

16 years agoBug 583565 – babl 0.1.0 build fixes
Fryderyk Dziarmagowski [Sat, 23 May 2009 10:49:25 +0000 (12:49 +0200)]
Bug 583565 – babl 0.1.0 build fixes

The DESTDIR variable should not be used in a Makefile.am.

16 years agoObsolete the ChangeLog file
Martin Nordholts [Wed, 20 May 2009 23:44:31 +0000 (01:44 +0200)]
Obsolete the ChangeLog file

16 years agoBump version to 0.1.1
Martin Nordholts [Wed, 20 May 2009 23:44:18 +0000 (01:44 +0200)]
Bump version to 0.1.1

16 years ago0.1.0 released
Martin Nordholts [Tue, 19 May 2009 18:30:50 +0000 (20:30 +0200)]
0.1.0 released

16 years agoBump version to 0.1.0
Martin Nordholts [Tue, 19 May 2009 18:04:21 +0000 (20:04 +0200)]
Bump version to 0.1.0

Bump version to 0.1.0 and make sure the link name remains `babl-0.0'.

16 years agodocs: Add .libs directories to BABL_PATHs
Martin Nordholts [Wed, 20 May 2009 20:27:27 +0000 (22:27 +0200)]
docs: Add .libs directories to BABL_PATHs

Also add .libs directories to the BABL_PATHs so that e.g. the
BablFishPath introspection chart is properly generated when doing a
build, at least on Linux.

16 years agodocs: Convert SVN references to git
Martin Nordholts [Wed, 20 May 2009 17:30:18 +0000 (19:30 +0200)]
docs: Convert SVN references to git

16 years agoUpdate ChangeLog
Martin Nordholts [Tue, 19 May 2009 17:59:15 +0000 (19:59 +0200)]
Update ChangeLog

16 years agoUpdate NEWS with release date
Martin Nordholts [Tue, 19 May 2009 18:13:14 +0000 (20:13 +0200)]
Update NEWS with release date

16 years agoFinish update of AUTHORS..
Martin Nordholts [Tue, 19 May 2009 05:39:40 +0000 (07:39 +0200)]
Finish update of AUTHORS..

16 years agoUpdate AUTHORS and NEWS for 0.1.0
Martin Nordholts [Tue, 19 May 2009 05:24:50 +0000 (07:24 +0200)]
Update AUTHORS and NEWS for 0.1.0

16 years agoAdd extern "C" to the header for C++ friendliness.
Hubert Figuiere [Sat, 16 May 2009 07:27:03 +0000 (03:27 -0400)]
Add extern "C" to the header for C++ friendliness.

17 years agoBug 568576 – [PATCH] undefined operation fix
Martin Nordholts [Sat, 4 Apr 2009 19:46:35 +0000 (19:46 +0000)]
Bug 568576 – [PATCH] undefined operation fix

Patch from Stanislav Brabec

svn path=/trunk/; revision=415

17 years agoUpdate AUTHORS for 0.1.0
Martin Nordholts [Sat, 4 Apr 2009 10:21:20 +0000 (10:21 +0000)]
Update AUTHORS for 0.1.0

svn path=/trunk/; revision=414

17 years agoextensions: util.h is part of the source
Martin Nordholts [Sat, 4 Apr 2009 09:32:42 +0000 (09:32 +0000)]
extensions: util.h is part of the source

make distcheck passes now

svn path=/trunk/; revision=413

17 years agobabl/Makefile.am: Add forgotten header files
Martin Nordholts [Sat, 4 Apr 2009 09:32:38 +0000 (09:32 +0000)]
babl/Makefile.am: Add forgotten header files

babl/Makefile.am: Add forgotten header files that needs to be
distributed with a release.

svn path=/trunk/; revision=412

17 years agoMakefile.am: We don't have a COPYING.LESSER anymore
Martin Nordholts [Sat, 4 Apr 2009 09:32:34 +0000 (09:32 +0000)]
Makefile.am: We don't have a COPYING.LESSER anymore

svn path=/trunk/; revision=411

17 years agoUpdate ChangeLog with previous commit
Martin Nordholts [Sat, 4 Apr 2009 09:32:31 +0000 (09:32 +0000)]
Update ChangeLog with previous commit

svn path=/trunk/; revision=410

17 years agoUpdate NEWS for 0.1.0
Martin Nordholts [Wed, 1 Apr 2009 19:37:12 +0000 (19:37 +0000)]
Update NEWS for 0.1.0

svn path=/trunk/; revision=409

17 years agoAvoid the need for define __func__ "unknown" on some vendor compilers
Martin Nordholts [Tue, 31 Mar 2009 17:09:42 +0000 (17:09 +0000)]
Avoid the need for define __func__ "unknown" on some vendor compilers

Patch from Gary V. Vaughan

svn path=/trunk/; revision=408

17 years agoDon't try to pass gcc flags to vendor compilers
Martin Nordholts [Tue, 31 Mar 2009 17:09:38 +0000 (17:09 +0000)]
Don't try to pass gcc flags to vendor compilers

Patch from Gary V. Vaughan

svn path=/trunk/; revision=407

17 years agoRewrite xml-insert.sh in portable bourne-shell
Martin Nordholts [Tue, 31 Mar 2009 17:09:34 +0000 (17:09 +0000)]
Rewrite xml-insert.sh in portable bourne-shell

Patch from Gary V. Vaughan

svn path=/trunk/; revision=406

17 years agoDon't use depecrated features or reduntant declarations in Makefile.am
Martin Nordholts [Tue, 31 Mar 2009 17:09:29 +0000 (17:09 +0000)]
Don't use depecrated features or reduntant declarations in Makefile.am

Patch from Gary V. Vaughan

svn path=/trunk/; revision=405

17 years agoSupport hpux use of shl load/unload and dsos with .sl suffixes
Martin Nordholts [Tue, 31 Mar 2009 17:09:22 +0000 (17:09 +0000)]
Support hpux use of shl load/unload and dsos with .sl suffixes

Patch from Gary V. Vaughan

svn path=/trunk/; revision=404

17 years agoApplied patch from Matteo 'Peach' Pescarin which makes build use rsvg
Kevin Cozens [Fri, 27 Mar 2009 20:13:01 +0000 (20:13 +0000)]
Applied patch from Matteo 'Peach' Pescarin which makes build use rsvg

* configure.ac:
* docs/graphics/Makefile.am: Applied patch from Matteo 'Peach'
Pescarin which makes build use rsvg binary instead of inkscape
to create pngs. Fixes bug 571516.

svn path=/trunk/; revision=403

17 years agoBABL_VARIADIC_MACROS needs to be called before the libtool stuff (which
Manish Singh [Thu, 26 Mar 2009 22:26:38 +0000 (22:26 +0000)]
BABL_VARIADIC_MACROS needs to be called before the libtool stuff (which

* configure.ac: BABL_VARIADIC_MACROS needs to be called before
the libtool stuff (which implicitly calls AC_PROG_CXX)

svn path=/trunk/; revision=402

17 years agoNULL-statements caused by trailing commas are non-portable
Martin Nordholts [Wed, 25 Mar 2009 19:02:39 +0000 (19:02 +0000)]
NULL-statements caused by trailing commas are non-portable

Patch from Gary V. Vaughan

svn path=/trunk/; revision=401

17 years agoHandle variadic macros in a portable way
Martin Nordholts [Wed, 25 Mar 2009 19:02:35 +0000 (19:02 +0000)]
Handle variadic macros in a portable way

Apply patch from Gary V. Vaughan that adds configure time checks for
variadic macros and adapts the definitions of such macros in-code
accordingly so that babl can be compiled on more platforms.

svn path=/trunk/; revision=400

17 years agoSome vendor compilers can't compile non-constant elements of compound struct initializers
Martin Nordholts [Wed, 25 Mar 2009 19:02:31 +0000 (19:02 +0000)]
Some vendor compilers can't compile non-constant elements of compound struct initializers

Patch from Gary V. Vaughan

svn path=/trunk/; revision=399

17 years agoSome vendor C compilers choke on C++ comments
Martin Nordholts [Wed, 25 Mar 2009 19:02:28 +0000 (19:02 +0000)]
Some vendor C compilers choke on C++ comments

Patch from Gary V. Vaughan

svn path=/trunk/; revision=398

17 years agoenum values must be less than INT_MAX (sign bit is illegal)
Martin Nordholts [Wed, 25 Mar 2009 19:02:24 +0000 (19:02 +0000)]
enum values must be less than INT_MAX (sign bit is illegal)

Patch from Gary V. Vaughan

svn path=/trunk/; revision=397

17 years agoRemove trailing comma in enum declaration
Martin Nordholts [Wed, 25 Mar 2009 19:02:20 +0000 (19:02 +0000)]
Remove trailing comma in enum declaration

Patch from Gary V. Vaughan

svn path=/trunk/; revision=396

17 years agoInclude config.h in some files that missed it
Martin Nordholts [Wed, 25 Mar 2009 19:02:17 +0000 (19:02 +0000)]
Include config.h in some files that missed it

Patch from Gary V. Vaughan

svn path=/trunk/; revision=395

17 years agobased on a patch from Gary V. Vaughan, include "config.h" before any other
Sven Neumann [Tue, 24 Feb 2009 21:17:27 +0000 (21:17 +0000)]
based on a patch from Gary V. Vaughan, include "config.h" before any other

2009-02-24  Sven Neumann  <sven@gimp.org>

* */*.c: based on a patch from Gary V. Vaughan, include
"config.h"
before any other header file from all .c files.

* babl/babl-internal.h
* extensions/util.h: instead of including config.h from here,
bail
out if it wasn't included beforehand.

svn path=/trunk/; revision=394

17 years agoAdd .gitignore files generated with git svn create-ignore
Martin Nordholts [Fri, 20 Feb 2009 21:18:56 +0000 (21:18 +0000)]
Add .gitignore files generated with git svn create-ignore

svn path=/trunk/; revision=393

17 years agoInclude headers in babl.h as system headers
Martin Nordholts [Fri, 20 Feb 2009 21:10:03 +0000 (21:10 +0000)]
Include headers in babl.h as system headers

svn path=/trunk/; revision=392

17 years agobabl/babl.h renamed babl_format_get_num_of_components() to
Sven Neumann [Mon, 26 Jan 2009 08:59:14 +0000 (08:59 +0000)]
babl/babl.h renamed babl_format_get_num_of_components() to

2009-01-26  Sven Neumann  <sven@gimp.org>

* babl/babl.h
* babl/babl-format.c: renamed
babl_format_get_num_of_components()
to babl_format_get_n_components().
(babl_format_has_alpha): changed accordingly.

svn path=/trunk/; revision=391

17 years agoDo a complete overhaul of the babl API.
Martin Nordholts [Sat, 24 Jan 2009 08:52:04 +0000 (08:52 +0000)]
Do a complete overhaul of the babl API.

* babl/babl.h: Instead of including subsystem headers, declare the
functions part of the API directly in the header. The public
types, macros and the version header is still pulled in as
includes but with inclusion guards that prevent them from being
included separately by clients. Notable things removed from the
API is internal class functions and the class instance structs.

(babl_format_has_alpha)
(babl_format_get_bytes_per_pixel)
(babl_format_get_num_of_components)
(babl_format_get_type): New getters to allow the Babl union to
become opaque for clients.

* babl/babl-types.h: New file with public types. Currently only
the opaque Babl union and the linear and planar conversion
function prototypes (which are not used in the API due to the use
of varags but still part of the API for reference) are there. Make
sure it's only included indirectly through babl.h.

* babl/babl-macros.h
* babl/babl-version.h.in: Make sure these are not included
directly, only indirectly through babl.h.

* babl/babl-main.h: Removed, function declarations are in babl.h
now.

* babl/babl-internal.h: Include the headers we now consider
internal, mostly the different class headers.

* babl/babl-class.h: The "named class" function declarations are
now in the public header so move them away from this internal
header.

* babl/babl-image.h
* babl/babl-format.h
* babl/babl-fish.h
* babl/babl-extension.h
* babl/babl-conversion.h
* babl/babl-component.h
* babl/babl-classes.h
* babl/babl-introspect.h
* babl/babl-sampling.h
* babl/babl-model.h
* babl/babl-type.h: Adapt to above changes, move relevant things to babl.h

* babl/base/formats.c
* babl/base/model-gray.c
* babl/base/model-rgb.c
* babl/base/model-ycbcr.c
* babl/base/type-float.c: Explicitly #include "babl-classes.h".

* babl/babl-internal.c: s/babl_name/babl_get_name/

* babl/babl-format.c
(babl_format_has_alpha)
(babl_format_get_bytes_per_pixel)
(babl_format_get_num_of_components)
(babl_format_get_type): Implement these.

* babl/Makefile.am: Don't install the now internal headers and
add, remove and install the other headers according to above
changes.

svn path=/trunk/; revision=390

17 years agoSince babl_foo_from_id() will not be part of the public API we can
Martin Nordholts [Tue, 20 Jan 2009 19:29:49 +0000 (19:29 +0000)]
Since babl_foo_from_id() will not be part of the public API we can
revert to having the short variant babl_foo() instead of
babl_foo_from_name().

* babl/babl-class.h
* babl/babl-component.h
* babl/babl-conversion.c
* babl/babl-conversion.h
* babl/babl-extension.h
* babl/babl-fish-path.c
* babl/babl-fish.c
* babl/babl-format.c
* babl/babl-format.h
* babl/babl-image.c
* babl/babl-internal.h
* babl/babl-model.c
* babl/babl-model.h
* babl/babl-type.c
* babl/babl-type.h
* extensions/CIE-Lab.c
* extensions/frequency.c
* extensions/gegl-fixups.c
* extensions/gggl-lies.c
* extensions/gggl.c
* extensions/gimp-8bit.c
* extensions/naive-CMYK.c
* extensions/sse-fixups.c
* tests/grayscale_to_rgb.c
* tests/rgb_to_bgr.c
* tests/rgb_to_ycbcr.c

svn path=/trunk/; revision=389

17 years agoAdd include guards.
Martin Nordholts [Sun, 18 Jan 2009 18:18:19 +0000 (18:18 +0000)]
Add include guards.

* babl/babl-component.h
* babl/babl-conversion.h
* babl/babl-extension.h
* babl/babl-fish.h
* babl/babl-format.h
* babl/babl-image.h
* babl/babl-model.h
* babl/babl-sampling.h
* babl/babl-type.h

svn path=/trunk/; revision=388

17 years agoNamespace the include guard.
Martin Nordholts [Sun, 18 Jan 2009 18:12:52 +0000 (18:12 +0000)]
Namespace the include guard.

* babl/babl-db.h: Namespace the include guard.

svn path=/trunk/; revision=387

17 years agoDo a s/babl_destroy/babl_exit since 'destroy' is better paired
Martin Nordholts [Sun, 18 Jan 2009 15:14:59 +0000 (15:14 +0000)]
Do a s/babl_destroy/babl_exit since 'destroy' is better paired
with a 'create' and other libraries also use the 'init'/'exit'
pair, including GEGL. Keep a define for babl_destroy unless
BABL_DISABLE_DEPRECATED is defined.

* babl/babl-main.h
* babl/babl.c
* tests/babl-html-dump.c
* tests/babl_class_name.c
* tests/babl_fish_path_dhtml.c
* tests/babl_fish_path_fitness.c
* tests/conversions.c
* tests/formats.c
* tests/grayscale_to_rgb.c
* tests/introspect.c
* tests/models.c
* tests/nop.c
* tests/rgb_to_bgr.c
* tests/rgb_to_ycbcr.c
* tests/sanity.c
* tests/srgb_to_lab_u8.c
* tests/types.c

svn path=/trunk/; revision=386

17 years agoNew file collecting the type constants, includes and the union for the
Martin Nordholts [Sun, 18 Jan 2009 13:33:52 +0000 (13:33 +0000)]
New file collecting the type constants, includes and the union for the

* babl/babl-classes.h: New file collecting the type constants,
includes and the union for the babl classes. When adding a new
class this is the only installed header file that requires
modification.

* babl/babl-class.h: Move the class type enums to the new file.

* babl/babl.h: Include babl-classes.h instead of each class on its
own, and move the Babl union to the new file.

* babl/Makefile.am: Add the new file.

svn path=/trunk/; revision=385

17 years agobabl/babl-component.h babl/babl-conversion.h babl/babl-extension.h
Sven Neumann [Sun, 18 Jan 2009 10:36:09 +0000 (10:36 +0000)]
babl/babl-component.h babl/babl-conversion.h babl/babl-extension.h

2009-01-18  Sven Neumann  <sven@gimp.org>

* babl/babl-component.h
* babl/babl-conversion.h
* babl/babl-extension.h
* babl/babl-format.h
* babl/babl-model.h
* babl/babl-type.h: allow to disable the defines that were added
for backward compatibility by definining
BABL_DISABLE_DEPRECATED.

* babl/babl-image.h: removed trailing whitespace.

svn path=/trunk/; revision=384

17 years agoAdd #define babl_foo babl_foo_from_name macros, that should fix
Martin Nordholts [Sun, 18 Jan 2009 07:26:43 +0000 (07:26 +0000)]
Add #define babl_foo babl_foo_from_name macros, that should fix
most builds that broke due to the below refactoring.

* babl/babl-component.h
* babl/babl-conversion.h
* babl/babl-extension.h
* babl/babl-format.h
* babl/babl-model.h
* babl/babl-type.h

svn path=/trunk/; revision=383

17 years agos/babl_image/babl_image_new/
Martin Nordholts [Sat, 17 Jan 2009 21:31:48 +0000 (21:31 +0000)]
s/babl_image/babl_image_new/

* babl/babl-fish-reference.c
* babl/babl-image.c
* babl/babl-image.h

svn path=/trunk/; revision=382

17 years agos/babl_foo_init/babl_foo_class_init/
Martin Nordholts [Sat, 17 Jan 2009 19:30:40 +0000 (19:30 +0000)]
s/babl_foo_init/babl_foo_class_init/
s/babl_foo_destroy/babl_foo_class_destroy/
s/babl_foo_each/babl_foo_class_for_each/
s/babl_foo/babl_foo_from_name/
s/babl_foo_id/babl_foo_from_id/

* babl/babl-class.h
* babl/babl-conversion.c
* babl/babl-core.c
* babl/babl-fish-path.c
* babl/babl-fish-reference.c
* babl/babl-fish-stats.c
* babl/babl-fish.c
* babl/babl-format.c
* babl/babl-image.c
* babl/babl-internal.h
* babl/babl-introspect.c
* babl/babl-model.c
* babl/babl-sampling.c
* babl/babl-sanity.c
* babl/babl-type.c
* babl/babl.c
* babl/base/formats.c
* babl/base/model-gray.c
* babl/base/model-rgb.c
* babl/base/model-ycbcr.c
* babl/base/type-float.c
* babl/base/type-u16.c
* babl/base/type-u32.c
* babl/base/type-u8.c
* extensions/CIE-Lab.c
* extensions/frequency.c
* extensions/gegl-fixups.c
* extensions/gggl-lies.c
* extensions/gggl.c
* extensions/gimp-8bit.c
* extensions/naive-CMYK.c
* extensions/sse-fixups.c
* tests/babl-html-dump.c
* tests/babl_fish_path_fitness.c
* tests/conversions.c
* tests/formats.c
* tests/grayscale_to_rgb.c
* tests/models.c
* tests/rgb_to_bgr.c
* tests/rgb_to_ycbcr.c
* tests/types.c

svn path=/trunk/; revision=381

17 years agoFix bogus ChangeLog formating in two of my recent entries.
Martin Nordholts [Sat, 17 Jan 2009 18:45:56 +0000 (18:45 +0000)]
Fix bogus ChangeLog formating in two of my recent entries.

svn path=/trunk/; revision=380

17 years agoRemove babl_name() and babl_introspect() which slipped in here.
Martin Nordholts [Sat, 17 Jan 2009 18:43:54 +0000 (18:43 +0000)]
Remove babl_name() and babl_introspect() which slipped in here.

* babl/babl-class.h: Remove babl_name() and babl_introspect()
which slipped in here.

svn path=/trunk/; revision=379

17 years agoextensions/gegl-fixups.c #include <stdlib.h>
Martin Nordholts [Sat, 17 Jan 2009 18:42:03 +0000 (18:42 +0000)]
extensions/gegl-fixups.c #include <stdlib.h>

* extensions/gegl-fixups.c
* extensions/sse-fixups.c: #include <stdlib.h>

svn path=/trunk/; revision=378

17 years agoDon't #include <stdlib.h>
Martin Nordholts [Sat, 17 Jan 2009 14:49:30 +0000 (14:49 +0000)]
Don't #include <stdlib.h>

* babl/babl.h: Don't #include <stdlib.h>

* babl/base/formats.c
* babl/base/model-gray.c
* babl/base/model-rgb.c: #include <stdlib.h>

svn path=/trunk/; revision=377

17 years agoMake babl.h look clean.
Martin Nordholts [Sat, 17 Jan 2009 14:35:56 +0000 (14:35 +0000)]
Make babl.h look clean.

* babl/babl-introspect.h: New installed header for babl_name() and
babl_introspect().

* babl/babl.h: Include it.

* babl/Makefile.am: Add it.

svn path=/trunk/; revision=376

17 years agoFormating.
Martin Nordholts [Sat, 17 Jan 2009 14:20:11 +0000 (14:20 +0000)]
Formating.

* babl/babl-internal.h: Formating.

svn path=/trunk/; revision=375

17 years agoNew installed header file containing class and typesystem definitions and
Martin Nordholts [Sat, 17 Jan 2009 14:16:18 +0000 (14:16 +0000)]
New installed header file containing class and typesystem definitions and

* babl/babl-class.h: New installed header file containing class
and typesystem definitions and types.

* babl/babl.h: Include it.

* babl/Makefile.am: Add it.

svn path=/trunk/; revision=374

17 years agoMove forward declaration of BablList to the beginning...
Martin Nordholts [Sat, 17 Jan 2009 14:05:23 +0000 (14:05 +0000)]
Move forward declaration of BablList to the beginning...

svn path=/trunk/; revision=373

17 years agoMove up forward declaration of BablList.
Martin Nordholts [Sat, 17 Jan 2009 14:03:37 +0000 (14:03 +0000)]
Move up forward declaration of BablList.

* babl/babl.h: Move up forward declaration of BablList.

* babl/babl-list.h: Completely rely on that declaration.

svn path=/trunk/; revision=372

17 years agoDon't have BABL_ALPHA_THRESHOLD public yet.
Martin Nordholts [Sat, 17 Jan 2009 13:47:52 +0000 (13:47 +0000)]
Don't have BABL_ALPHA_THRESHOLD public yet.

* babl/babl.h: Don't have BABL_ALPHA_THRESHOLD public yet.

* babl/base/util.h: Put it here for now instead.

svn path=/trunk/; revision=371